package com.scujj.cs6.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;

import com.scujj.cs6.model.vo.WeatherForecastVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @TableName weather_forecast
 */
@TableName(value ="weather_forecast")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WeatherForecast implements Serializable {
    @TableId(value = "id")
    private Long id;
    @TableField(value = "adcode")
    private String adcode;
    @TableField(value = "date")
    private LocalDate date;
    @TableField(value = "week")
    private String week;
    @TableField(value = "text_day")
    private String textDay;
    @TableField(value = "text_night")
    private String textNight;
    @TableField(value = "high")
    private Integer high;
    @TableField(value = "low")
    private Integer low;
    @TableField(value = "wc_day")
    private String wcDay;
    @TableField(value = "wc_night")
    private String wcNight;
    @TableField(value = "wd_day")
    private String wdDay;
    @TableField(value = "wd_night")
    private String wdNight;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public WeatherForecast(WeatherForecastVo item) {
        BeanUtils.copyProperties(item, this);
    }
}